
import java.io.PrintWriter;
import java.util.HashMap;

class Assign extends Statement {

	private Node var_;
	private Node exp_;

	public Assign(Node e, Node v) {
		exp_ = e;
		var_ = v;
	}

	@Override
	public void print(PrintWriter pw) {
		pw.println("Node name : Assign");
		// assert(var_ && exp_);
		var_.print(pw);
		exp_.print(pw);
	}

	public String translate(HashMap<String, PrintWriter> pws, String strPare, SymbolTable st, String parent){
		String key = st.getStack().get(1);
		PrintWriter pw = pws.get(key);
		printIndent(pw, st.getLevel());
		var_.translate(pws,null, st, parent);
		pw.print("=");
		exp_.translate(pws,null, st, parent);
		return null;
	}

}
